/*
 * Copyright 2025 The JA-SIG Collaborative. All rights reserved.
 * distributed with this file and available online at
 */
package com.lap.auth.domain.menu;

import com.lap.framework.common.ddd.AggregateRoot;
import lombok.Getter;

/**
 * 菜单访问日志领域。
 *
 * @author Shuisheng Lao(劳水生)
 * @version 0.0.1
 */
@Getter
public class MenuViewLog extends AggregateRoot {

  private final Integer id;
  private final Integer userId;
  private final String userName;
  private final String fullName;
  private final String accessUri;
  private final String accessMethod;
  private final String accessIp;
  private final String accessAddress;
  private final String accessParam;
  private final String accessResult;
  private final String browser;
  private final String operatingSystem;
  private final Long times;

  public MenuViewLog(
      Integer id,
      Integer userId,
      String userName,
      String fullName,
      String accessUri,
      String accessMethod,
      String accessIp,
      String accessAddress,
      String accessParam,
      String accessResult,
      String browser,
      String operatingSystem,
      Long times) {
    this.id = id;
    this.userId = userId;
    this.userName = userName;
    this.fullName = fullName;
    this.accessUri = accessUri;
    this.accessMethod = accessMethod;
    this.accessIp = accessIp;
    this.accessAddress = accessAddress;
    this.accessParam = accessParam;
    this.accessResult = accessResult;
    this.browser = browser;
    this.operatingSystem = operatingSystem;
    this.times = times;
  }

  public boolean isNew() {
    return (id == null);
  }
}
